package cn.stylefeng.guns.modular.commodity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @author allen
 * @date 2021/4/11 17:59
 * @version 1.0
 */

/**
 * 商品中心的属性分组和属性的关联关系表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "commodity_property_group_relationship")
public class CommodityPropertyGroupRelationshipEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 属性分组ID
     */
    @TableField(value = "property_group_id")
    private Long propertyGroupId;

    /**
     * 属性ID
     */
    @TableField(value = "property_id")
    private Long propertyId;

    /**
     * 属性是否必填，1：是必填，0：非必填
     */
    @TableField(value = "is_required")
    private Integer isRequired;

    /**
     * 属性类型，1：关键属性，2：销售属性，3：非关键属性，4：导购属性，这里可以有多个值拼接在一起，比如1,2，2,4
     */
    @TableField(value = "property_types")
    private String propertyTypes;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_PROPERTY_GROUP_ID = "property_group_id";

    public static final String COL_PROPERTY_ID = "property_id";

    public static final String COL_IS_REQUIRED = "is_required";

    public static final String COL_PROPERTY_TYPES = "property_types";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";
}